package cn.iocoder.yudao.framework.pay.core.client.impl.hftx.vo;

/**
 * 汇付天下支付方式枚举类
 *
 * @author sisansan
 * @date 2025/3/5
 */
public enum TradeTypeEnum {

    T_JSAPI("T_JSAPI", "微信公众号"),

    T_MINIAPP("T_MINIAPP", "微信小程序"),

    A_JSAPI("A_JSAPI", "支付宝JS"),

    A_NATIVE("A_NATIVE", "支付宝正扫"),

    U_NATIVE("U_NATIVE", "银联正扫"),

    U_JSAPI("U_JSAPI", "银联JS"),

    D_NATIVE("D_NATIVE", "数字人民币正扫"),

    T_H5("T_H5", "微信直连H5支付"),

    T_APP("T_APP", "微信APP支付"),

    T_NATIVE("T_NATIVE", "微信正扫");

    private final String code;
    private final String desc;

    TradeTypeEnum(String code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public static TradeTypeEnum getByCode(String code) {
        for (TradeTypeEnum type : values()) {
            if (type.getCode().equals(code)) {
                return type;
            }
        }
        return null;
    }

    public String getCode() {
        return code;
    }

    public String getDesc() {
        return desc;
    }
}
